package com.doform.android.xianggucheng.bean.request_bean;

import com.doform.android.xianggucheng.help.AppHelp;
import com.google.gson.Gson;

/**
 * 作者 Y_MS
 * Created by ${APEN} on 2017-08-04.
 * GitHub：https://github.com/cxydxpx
 */

public class ReqAddArtcle {

    /**
     * _savetype 	是 	string 	操作类型：新增：add ； 编辑：update
     * guid 	否 	string 	GUID
     * name 	是 	string 	商品名称
     * clslayerids 	是 	string 	分类层次ID
     * supplierid 	是 	string 	供应商ID
     * mtype 	否 	string 	商品类型 1:自营 2:调货
     * costprice 	否 	string 	成本价
     * defsaleprice 	否 	string 	销售价
     * unit 	是 	string 	计量单位
     * unit_id 	是 	string 	计量单位ID
     * debug 	是 	string 	开启：true
     * img 	否 	string 	图片ID 	1079,1080,1081
     * imgfile
     */
    private String state;
    private String img;
    private String imgfile;
    private String _savetype = "add";
    private boolean debug = AppHelp.getInstance().Debug;
    private String name;
    private String clslayerids;
    private String supplierid;
    private String costprice;
    private String defsaleprice;
    private String unit;
    private String unit_id;


    public ReqAddArtcle(String mName, String mCategoryFId, String mVendorId, String mCostPrice,
                        String mRetailPrice, String mMessureId, String mMessureName,
                        String img, String imgFile,String mArtcleState) {
        this.state = mArtcleState;
        this.name = mName;
        this.clslayerids = mCategoryFId;
        this.supplierid = mVendorId;
        this.costprice = mCostPrice;
        this.defsaleprice = mRetailPrice;
        this.unit = mMessureName;
        this.unit_id = mMessureId;
        this.img = img;
        this.imgfile = imgFile;
    }

    @Override
    public String toString() {
        return new Gson().toJson(this);
    }
}
